package com.zlsy.secondtime.threadcoreknowledge.uncaughtexception;

/**
 * @author zhouliang
 * @date 2020/5/19 8:57
 * <p>
 * 单线程，抛出，处理，有堆栈信息
 * 多线程：子线程发送异常，会发生什么、
 */
public class ExceptionInChildThread implements Runnable {

    @Override
    public void run() {
        throw new RuntimeException();
    }

    public static void main(String[] args) {
        ExceptionInChildThread r = new ExceptionInChildThread();
        Thread thread = new Thread(r);
        thread.start();
        for (int i = 0; i < 100; i++) {
            System.out.println("主线程打印:" + i);
        }
    }
}
